package com.example.yeujian5.yuejian5.service;

import com.example.yeujian5.yuejian5.bean.MasterBean;
import com.example.yeujian5.yuejian5.bean.MasterVideoBean;
import com.example.yeujian5.yuejian5.bean.QuestionBean;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by wangmengmeng on 2017/10/10.
 */

public interface MasterService {


    //大师列表
    @GET("lists/mod/master")
    Call<List<MasterBean>> getMasterList(

    );

    //大师详情
    @GET("get/mod/master")
    Call<MasterBean> getMasterById(
            @Query("id") String id
    );

    //大师视频列表
    @GET("get/mod/master/related/1/")
    Call<MasterVideoBean>getVideoList(
            @Query("id") String id,
            @Query("map") String mvideo);



    //大师问答
    @GET("lists/mod/masterfaq/")
    Call<List<QuestionBean>> getQuestionList(
            @Query("master_id") String master_id
    );

    //获取大师的收藏状态
    @GET("isExits/mod/fans/fan_id/{fan_id}/userid/{userid}/fans_type/{fans_type}/SessionID/{SessionID}")
    Call<Integer> isCollected(
            @Path("fan_id") String fan_id,
            @Path("userid") int userid,
            @Path("fans_type") String fans_type,
            @Path("SessionID") String SessionID
    );

    //关注大师
    @GET("focus/SessionID/{SessionID}/userid/{userid}/fan_id/{fan_id}/fans_type/{fans_type}")
    Call<Integer> userCollectMaster(
            @Path("SessionID") String SessionID,
            @Path("userid") int userid,
            @Path("fan_id") String fan_id,
            @Path("fans_type") String fans_type
    );

    //取消关注
    @GET("delete/mod/fans/user_id/{user_id}/fan_id/{fan_id}/fan_type/{fan_type}")
    Call<Integer> changeTeaState1(
            @Path("user_id") int user_id,
            @Path("fan_id") String fan_id,
            @Path("fan_type") String fan_type
    );

    //添加问题
    @GET("create/mod/masterfaq/SessionID/lgj98rfkiqvenhrk2o7oe2po81")
    Call<Integer> addQuestion(@Query("master_id") String master_id,
                        @Query("user_id") int user_id,
                        @Query("question") String question

    );




}
